<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>爬</title>
	</head>
	<script src="./js/jQurey.js"></script>
	<body>
		<div>
			<div >
				编号:<span id="itemId"></span>
			</div>
			<div>
				价格:<span id="itemPrice"></span>
			</div>
		</div>
	</body>
</html>
<script>
	var jsonstr = '[{"p":"4198.00","op":"4198.00","cbf":"0","id":"J_100009989503","m":"10000.00"}]';
	console.log(jsonstr);
	
	/**
	 * 除去: p id 
	 * json浏览器直接支持技术,json对象,有个方法,可以把字符串转换成js对象
	 * 如果是一个json对象就可以以obj.p获取价格,obj.id获取编号
	 */
	var items = JSON.parse(jsonstr);
	console.log(items[0]);
	console.log(items[0].p);
	console.log(items[0].id);
	
	$("#itemId").text(items[0].id);
	$("#itemId").css("color","blue");
	$("#itemPrice").text(items[0].p);
	$("#itemPrice").css("color","red");


</script>
